Skip to content

Conversation

@p30arena
Copy link

@p30arena p30arena commented Aug 1, 2025

Related GitHub Issue

Closes: #

Roo Code Task Context (Optional)

Description

Test Procedure

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

Additional Notes

Get in Touch


Important

Introduces gemini-cli provider using OAuth, updates validation, UI components, and localization for support.

  • New Provider:
    • Adds gemini-cli provider using OAuth authentication, no API key needed (gemini-cli.ts, index.ts).
  • Validation:
    • Updates validate.ts to exclude API key validation for gemini-cli.
  • UI Components:
    • Adds GeminiCli component to ApiOptions.tsx for configuration.
  • Localization:
    • Updates localization files to include gemini-cli related strings in multiple languages.

This description was created by Ellipsis for e2c37a8. You can customize this summary. It will automatically update as commits are pushed.

@p30arena p30arena requested review from cte, jr and mrubens as code owners August 1, 2025 20:10
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Aug 1, 2025
@p30arena p30arena closed this Aug 1, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 1, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 1, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I've reviewed the changes and found several issues that need attention before this can be merged.

import { BaseProvider } from "./base-provider"

// OAuth2 Configuration (from Cline implementation)
const OAUTH_CLIENT_ID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Critical Security Issue: These OAuth credentials should never be hardcoded in the source code. This poses a serious security risk as anyone can use these credentials.

Consider:

  1. Moving these to environment variables
  2. Using a secure configuration management system
  3. Documenting how users should obtain and configure their own OAuth credentials

Is this intentional? If these are meant to be shared credentials for the Gemini CLI tool, please add clear documentation explaining the security implications.


// Poll until operation is complete with timeout protection
const MAX_RETRIES = 30 // Maximum number of retries (60 seconds total)
let retryCount = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this timeout duration intentional? The polling could hang for up to 60 seconds (30 retries × 2 seconds). Consider:

Suggested change
let retryCount = 0
const MAX_RETRIES = 15 // Maximum number of retries (30 seconds total)

Or make it configurable through options?

/**
* Call a Code Assist API endpoint
*/
private async callEndpoint(method: string, body: any, retryAuth: boolean = true): Promise<any> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extensive use of any types here reduces type safety. Could we create proper TypeScript interfaces for the API responses? For example:

interface LoadCodeAssistResponse {
  cloudaicompanionProject?: string;
  allowedTiers?: Array<{ id: string; isDefault: boolean }>;
}

})
}
} catch (error) {
throw new Error(t("common:errors.geminiCli.oauthLoadFailed", { error }))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice these error translation keys are used but I don't see them added to the locale files. Could you add the missing translations to all language files in src/i18n/locales/*/common.json?

{t("settings:providers.geminiCli.setupLink")}
</VSCodeLink>

<div className="mt-3 p-3 bg-vscode-editorWidget-background border border-vscode-editorWidget-border rounded">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice UI implementation! The warning box with requirements is very helpful for users. Consider adding a visual indicator (like a green checkmark) when the OAuth file is detected at the specified path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant